
// const { Sequelize, DataTypes } = require("sequelize");
const { STRING, INTEGER, DATE } = require('../types')

module.exports = (sequelize) => {
  const wasteInfo = sequelize.define(
    'wasteInfo',
    {// 在这里定义模型属性
      id: {
        type: INTEGER,
        primaryKey:true,
        autoIncrement:true,
        allowNull:false
      },
      classification: { // 分类
        type: STRING,
        allowNull: false,
      },
      department: { // 科室
        type: STRING,
        allowNull: false
      },
      weight: { // 重量
        type: STRING,
        allowNull: true
      },
      recycle_person_id: { // 回收人员id
        type: INTEGER,
      },
      recycle_time: { // 回收时间
        type: STRING,
      },
      create_time: { // 接收时间
        type: STRING,
      },
      status: { // 状态
        type: STRING,
      },
      transfer_record_id: { // 转运记录id
        type: INTEGER,
      },
      archived: { // 已处理归档
        type: INTEGER,
      }
    },
    {
    tableName: "sys_waste_info",//直接提供表名
    timestamps: false
   }
  );
  return wasteInfo
}
